package com.itheima.tlias84.po;

import jakarta.validation.constraints.NotNull;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * 新增班级参数：页面上有啥，就有啥属性
 */
@Data
public class InsertClazzParam {
    private int id;
    @NotNull(message = "班级名称不能为空")
    @Length(min = 4, max = 30, message = "班级名称非法")
    private String name;
    @Length(min = 1, max = 20, message = "班级教室长度1-20之间")
    private String room;
    @NotNull(message = "开课时间必填")
    private LocalDate beginDate;
    @NotNull(message = "结课时间必填")
    private LocalDate endDate;
    private int masterId;
    @NotNull(message = "学科必选")
    private Integer subject;
    private Integer state;
    private LocalDateTime createTime;
    private LocalDateTime updateTime;
}
